refactor: move SearchOrganizationInvoices to FrontierService#1549
refactor: move SearchOrganizationInvoices to FrontierService#1549paanSinghCoder merged 3 commits intomainfrom
Conversation
Move the RPC from AdminService to FrontierService so org admins (not only platform superusers) can list their own org's invoices. Matches the gate pattern already used by FrontierService/ListInvoices (UpdatePermission on the org namespace). Superusers still pass via the standard interceptor bypass. - Bump PROTON_COMMIT to pick up the proto move (raystack/proton#476). - Regenerate proto/v1beta1 via `make proto`. - Swap authorization.go entry from IsSuperUser to IsAuthorized(org, UpdatePermission). - Switch the admin dashboard frontend from AdminServiceQueries to FrontierServiceQueries; request/response shape is unchanged. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 46 minutes and 7 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe pull request updates the Proton commit reference in the Makefile and migrates the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Coverage Report for CI Build 24653828616Coverage decreased (-0.001%) to 42.07%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
pkg/server/connect_interceptors/authorization.go (1)
998-1001: The authorization mapping is correct, but add test coverage for the org-scoped invoice gate.The code correctly uses
GetId()forSearchOrganizationInvoicesRequest(theIdfield contains the org ID) andGetOrgId()forListInvoicesRequest. Both routes properly enforceUpdatePermissionon the organization. However, no tests were found covering this authorization rule—consider adding unit or integration tests for org-admin allowed and non-authorized user denied scenarios.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 28e2fe83-8877-4216-bd1f-79713a100a45
⛔ Files ignored due to path filters (4)
proto/v1beta1/admin.pb.gois excluded by!**/*.pb.go,!proto/**proto/v1beta1/frontier.pb.gois excluded by!**/*.pb.go,!proto/**proto/v1beta1/frontierv1beta1connect/admin.connect.gois excluded by!proto/**proto/v1beta1/frontierv1beta1connect/frontier.connect.gois excluded by!proto/**
📒 Files selected for processing (3)
Makefilepkg/server/connect_interceptors/authorization.goweb/sdk/admin/views/organizations/details/invoices/index.tsx
…931e4ca9b087de8cd in package.json and pnpm-lock.yaml
Merge Proton PR-476 first
Summary
Dependency
Depends on raystack/proton#476 merging so the new `@raystack/proton` prerelease gets auto-published to npm. After that PR merges, `web/sdk/package.json` needs its `@raystack/proton` pin bumped to the new `0.1.0-` version before the TS build will pass.
Test plan
🤖 Generated with Claude Code